<template>
  <div id="home" v-if="isRecommend == true ? !isRecommend : !isRankingList">
    <TopNav></TopNav>
    <router-view></router-view>
  </div>
  <DayRecommend v-if="isRecommend"></DayRecommend>
  <RankingList v-if="isRankingList"></RankingList>
  <FooterMusic></FooterMusic>
</template>

<script>
import TopNav from "@/components/Home/TopNav";
import FooterMusic from "@/components/Item/FooterMusic";
import DayRecommend from "@/components/Home/DayRecommend";
import RankingList from "@/components/Home/RankingList";

import { computed } from "vue";
import { useStore } from "vuex";

export default {
  components: { FooterMusic, TopNav, DayRecommend, RankingList },
  setup() {
    let { state } = useStore();
    let isRecommend = computed(() => state.recommend.isRecommend);
    let isRankingList = computed(() => state.rankinglist.isRankingList);

    return {
      isRecommend,
      isRankingList,
    };
  },
};
</script>

<style lang="less">
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.icon {
  width: 0.5rem;
  height: 0.5rem;
}
li {
  list-style: none;
}
</style>
